package base.factory.idcard;

import base.factory.framework.Product;

/**
 * @program: DesignPatterns
 * @description: 具体的身份类
 * @author: Mr.Dai
 * @create: 2018-05-07 15:57
 **/
public class IdCard extends Product {

    private String name;

    IdCard(String name){
        System.out.println("创建了"+name+"的身份证");
        this.name=name;
    }
    @Override
    public void use() {
        System.out.println("使用了"+name+"的身份证");
    }

    public String getOwer(){
        return this.name;
    }
}
